package com.bsoft.gol.hbs.dao;

import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import ctd.persistence.support.hibernate.HibernateSupportDelegateDAO;
import ctd.spring.boot.annotation.SsdevDao;
import ctd.util.annotation.RpcService;
import pcn.sign.ExpressCompany;

import java.util.List;

/**
 * @Author zhusm@bsoft.com
 * @Description 快递公司表
 * @Date 2019/12/30
 */
@SsdevDao(serviceId = "expressCompany")
public abstract class ExpressCompanyDAO extends HibernateSupportDelegateDAO<ExpressCompany> {
    public ExpressCompanyDAO() {
        this.setKeyField("companyId");
    }

    @RpcService
    @DAOMethod(sql = "from ExpressCompany")
    public abstract List<ExpressCompany> findAllCode();

    @RpcService
    @DAOMethod(sql = " from ExpressCompany where expressCode =:expressCode and deleteFlag = '0'")
    public abstract ExpressCompany getExpressCompanyByCode(@DAOParam("expressCode") String expressCode);

}
